package com.ncs.service.impl;

import com.ncs.dao.ProductDao;
import com.ncs.domain.Product;
import com.ncs.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author yinyin
 * @create 2021/08/06 下午 7:39
 */
@Service("productService")
@Transactional
public class ProductServiceImpl implements ProductService {
    @Autowired
    ProductDao productDao;
    @Override
    @Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
    public List<Product> findAll() {
        return productDao.findAll();
    }
}
